<template>
  <span
    @click="$emit('click')"
    class="action-text"
    :class="{
      danger: type === 'danger',
      disabled,
    }"
  >
    <slot></slot>
  </span>
</template>
<script>
export default {
  props: {
    type: {
      type: String,
      default: 'primary',
    },
    disabled: {
      type: Boolean,
      default: false,
    },
  },
};
</script>
<style lang="scss" scoped>
  .action-text {
    cursor: pointer;
    color: #409EFF;
    padding: 0 6px;
    &.danger {
      color: #F56C6C;
    }
    &.disabled {
      cursor: not-allowed;
    }
  }
</style>
